USE <database_name>;
GO

-- list objects and which filegroup they belong
SELECT
	OBJECT_NAME(i.[object_id]) AS 'object_name',
    i.index_id,
    i.name AS index_name,
    i.type_desc AS index_type,
    i.data_space_id,
    f.name AS file_group,
    d.physical_name AS 'file_name',
	s.type_desc
FROM sys.indexes i
INNER JOIN sys.filegroups f
    ON f.data_space_id = i.data_space_id
INNER JOIN sys.database_files d
    ON f.data_space_id = d.data_space_id
INNER JOIN sys.data_spaces s
    ON f.data_space_id = s.data_space_id
WHERE OBJECTPROPERTY(i.[object_id], 'IsUserTable') = 1
ORDER BY OBJECT_NAME(i.[object_id]), f.name, i.data_space_id;
GO

-- which data is in which data file ?
SELECT 
    OBJECT_NAME(p.object_id) AS table_name, 
    u.type_desc,
    f.file_id,
    f.name,
    f.physical_name,
    f.size,
    f.max_size,
    f.growth,
    u.total_pages,
    u.used_pages,
    u.data_pages,
    p.partition_id,
    p.rows
FROM sys.allocation_units u 
INNER JOIN sys.database_files f ON u.data_space_id = f.data_space_id 
INNER JOIN sys.partitions p ON u.container_id = p.hobt_id
WHERE u.type IN (1, 3) AND OBJECT_NAME(p.object_id) = '<object_name>';